﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class LichChayBUS
    {
        public static List<LichChay> Select_All()
        {
            try
            {
                return LichChayDAO.Select_All();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichChay> Search(LichChay emp)
        {
            try
            {
                return LichChayDAO.Search(emp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Insert(LichChay emp)
        {
            try
            {
                return LichChayDAO.Insert(emp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Delete(String MaXe,String MaTD,String Ngay,String GioXuatBen)
        {
            try
            {
                return LichChayDAO.Delete(MaXe, MaTD, Ngay, GioXuatBen);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static bool Update(LichChay emp_cu,LichChay emp_moi)
        {
            try
            {
                return LichChayDAO.Update(emp_cu, emp_moi);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichChay> Select_by_TenTuyenDuong(String TenTD)
        {
            try
            {
                return LichChayDAO.Select_by_TenTuyenDuong(TenTD);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichChay> Select_GioXuatBen_ThemVe(String MaTD, String MaXe)
        {
            try
            {
                return LichChayDAO.Select_GioXuatBen_ThemVe(MaTD, MaXe);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static List<LichChay> Select_TuyenDuong_by_Ngay(String Ngay)
        {
            try
            {
                return LichChayDAO.Select_TuyenDuong_by_Ngay(Ngay);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
